/**********************************************
 * 
 * File Name				:	Constants.java
 * 
 * Last Changed Date		: 	$Date: 2009-08-06 14:51:00 +0800 (星期四, 06 八月 2009) $
 * 
 * Last Changed Revision	:	$Revision: 92 $
 * 
 * Last Changed Author		:	$Author: cfanboy $
 * 
 * File Header URL			:	$HeadURL: svn://www.svnhost.cn/Busi-Building/code/branch/src/com/busibuilding/common/Constants.java $
 * 
 * ********************************************
 */

package com.busibuilding.common;

/**
 * Class Name: Constants.java 
 * Description: This interface defined common constant of whole system
 * @author: yuzp
 * @version: 1.0
 * @since: 1.0
 * Date: 2009-07-09
 */

public interface Constants {
	/**
	 * Common constants
	 */
	public static final String EMPUT_STRING = "";	
	public static final String EXCEPTION_MESSAGE_PREFIX = "EXP_MSG_";
	public static final Integer SQLMAP_COMMON_RESULT_ERROR = -1;
	public static final String DATE_PATTERN = "yyyy-MM-dd";
	public static final String DATA_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
	public static final String ENCODING_FORMAT = "UTF-8";
	public static final String YES = "Y";
	public static final String NO = "N";
	public static final String FULL_YES = "YES";
	public static final String FULL_NO = "NO";
	public static final Integer ZERO_TIMES = 0;
	public static final Integer INIT_VERSION = 1;
	public static final String MENU_TYPE_FOLDER = "FOLDER";
	public static final String MENU_TYPE_ITEM = "ITEM";
	public static final String TRANS_SUCCESSFUL_MSG = "general.message.successful";
	public static final String TRANS_FAILURE_MSG = "general.message.failed";
	public static final Integer DEFAULT_PAGE_SIZE = 10; 
	public static final Integer DEFAULT_PAGE = 1;
	public static final String SYSTEM_MENU = "system_menu";
	
	
	
	/**
	 * The key that will be stored into Session
	 */
	public static final String SESSION_RAND_CODE = "RAND_CODE";
	public static final String SESSION_LOGON_ADMIN_USER = "LOGON_ADMIN_USER";
	public static final String SESSION_LOGON_USER = "LOGON_USER";
	public static final String COOKIE_NAME = "ROLE";
	
	/**
	 * Common Data Access Layer exception error code
	 */
	public static final String COMMON_DAO_ERROR_CODE_DELETE = "1001";
	public static final String COMMON_DAO_ERROR_CODE_INSERT = "1002";
	public static final String COMMON_DAO_ERROR_CODE_UPDATE = "1003";
	public static final String COMMON_DAO_ERROR_CODE_QUERY = "1004";
	public static final String COMMON_DAO_ERROR_OPTIMISTIC_LOCK = "1005";
	
	public static final String COMMON_ERROR_CODE_NULLPOINTER_EXCEPTION = "9000";
	public static final String COMMON_ERROR_CODE_CLASSCAST_EXCEPTION = "9005";
	public static final String COMMON_ERROR_CODE_IO_EXCEPTION = "9006";
	public static final String COMMON_ERROR_CODE_SQL_EXCEPTION = "9007";
	public static final String COMMON_ERROR_CODE_UNKNOWN = "9999";
	
	public static final String COMMON_ERROR_CODE_MAIL_AUTHENTICATION_EXCEPTION = "9100";
	public static final String COMMON_ERROR_CODE_MAIL_PARSE_EXCEPTION = "9101";
	public static final String COMMON_ERROR_CODE_MAIL_SEND_EXCEPTION = "9102";
	public static final String COMMON_ERROR_CODE_MAIL_PREPARATION_EXCEPTION = "9103";
	public static final String COMMON_ERROR_CODE_MAIL_OTHERS_EXCEPTION = "9104";
	
	public static final String COMMON_ERROR_CODE_TEMPLATE_GET_TEMPLATE = "9115";
	public static final String COMMON_ERROR_CODE_TEMPLATE_PROCESS_TEMPLATE = "9116";
	
	/**
	 * Parameter Code constant
	 */
	public static final String CONST_LOGON_FAILURE_TIMES_CODE = "LFT";
	
	/**
	 * Parameter Code Category constant
	 */
	public static final String CONST_SECURITY_CATEGORY = "SECUR";
	
}
